package com.lingjtx.common.pay.callback;

public enum NotifyType {

    TRANSACTION("transaction"),

    REFUND("refund");

    private final String name;

    NotifyType(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public static NotifyType of(String name) {
        for (NotifyType type : NotifyType.values()) {
            if (type.getName().equals(name)) {
                return type;
            }
        }
        throw new IllegalArgumentException("未匹配到 NotifyType");
    }

    @Override
    public String toString() {
        return name;
    }
}
